import { RouteConfig } from 'vue-router'
import Layout from '@/layout/index.vue'

const dashboardRoutes: RouteConfig[] = [
  {
    path: '/dashboard-o',
    component: Layout,
    redirect: '/index',
    meta: { hidden: true },
    children: [
      {
        path: 'index',
        component: () => import(/* webpackChunkName: "dashboard" */ '@/views/dashboard/index-o.vue'),
        name: 'DashboardOri',
        meta: {
          title: 'dashboard',
          icon: 'dashboard'
        }
      }
    ]
  },
  {
    path: '/',
    component: Layout,
    redirect: '/dashboard/db-charts1',
    children: [
      {
        path: 'dashboard',
        component: () => import(/* webpackChunkName: "dashboard" */ '@/views/dashboard/index.vue'),
        name: 'Dashboard',
        meta: {
          title: 'jsc',
          icon: 'dashboard',
          affix: true
        }
      }
    ]
  },
  {
    path: '/dashboard',
    component: Layout,
    redirect: '/db-charts1',
    meta: {
      title: 'jsczj',
      icon: 'dashboard',
      alwaysShow: true // will always show the root menu
    },
    children: [
      // {
      //   path: 'db-map',
      //   component: () => import(/* webpackChunkName: "dashboard" */ '@/views/dashboard/components/map/MapChart.vue'),
      //   name: 'MapChart',
      //   meta: {
      //     title: 'jscmap',
      //     icon: 'dashboard'
      //   }
      // },
      {
        path: 'db-ons',
        component: () => import(/* webpackChunkName: "dashboard" */ '@/views/dashboard/components-test/OverviewFigures.vue'),
        name: 'OverviewFigures',
        meta: {
          title: 'ons',
          icon: 'dashboard'
        }
      },
      {
        path: 'db-map-table',
        component: () => import(/* webpackChunkName: "dashboard" */ '@/views/dashboard/components-test/MapWithTable.vue'),
        name: 'MapWithTable',
        meta: {
          title: 'mapdist',
          icon: 'dashboard'
        }
      },
      {
        path: 'db-charts1',
        component: () => import(/* webpackChunkName: "dashboard" */ '@/views/dashboard/components-test/CombinedCharts1.vue'),
        name: 'CombinedCharts1',
        meta: {
          title: 'charts1',
          icon: 'dashboard'
        }
      },
      {
        path: 'db-charts2',
        component: () => import(/* webpackChunkName: "dashboard" */ '@/views/dashboard/components-test/CombinedCharts2.vue'),
        name: 'CombinedCharts2',
        meta: {
          title: 'charts2',
          icon: 'dashboard'
        }
      },
      {
        path: 'db-charts3',
        component: () => import(/* webpackChunkName: "dashboard" */ '@/views/dashboard/components-test/CombinedCharts3.vue'),
        name: 'CombinedCharts3',
        meta: {
          title: 'charts3',
          icon: 'dashboard'
        }
      },
      {
        path: 'db-branch',
        component: () => import(/* webpackChunkName: "dashboard" */ '@/views/dashboard/components-test/BranchView.vue'),
        name: 'BranchView',
        meta: {
          title: 'branchview',
          icon: 'dashboard'
        }
      }
    ]
  }
]

export default dashboardRoutes
